//
//  OrderGoodsTitleTableViewCell.m
//  rrqs
//
//  Created by 徐浩 on 2019/5/6.
//

#import "OrderGoodsTitleTableViewCell.h"

@interface OrderGoodsTitleTableViewCell()
@property(nonatomic,strong) UILabel* beizhuTitleLabel;
@end

@implementation OrderGoodsTitleTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self =  [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        
        [self createSubviews];
        
    }
    return self;
}

#pragma mark - createSubviews
-(void)createSubviews{
    [self.contentView addSubview:self.beizhuTitleLabel];
    [self.beizhuTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(kSizeRatio(46));
        make.right.equalTo(self.contentView.mas_right).offset(kSizeRatio(-46));
        make.top.equalTo(self.contentView.mas_top).offset(42);
    }];
    
    UILabel *hengLabel = [[UILabel alloc]init];
    [self.contentView addSubview:hengLabel];
    [hengLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.contentView);
        make.top.equalTo(self.beizhuTitleLabel.mas_bottom).offset(17);
        make.height.mas_equalTo(7);
    }];
    hengLabel.backgroundColor = COLORRGB(0xededed);
    
}

-(UILabel *)beizhuTitleLabel{
    if(!_beizhuTitleLabel){
        _beizhuTitleLabel = [[UILabel alloc]init];
        _beizhuTitleLabel.textColor = [UIColor blackColor];
        _beizhuTitleLabel.font = kFontNameSize(15);
        _beizhuTitleLabel.text = @"备注:备注";
    }
    return _beizhuTitleLabel;
}

-(void) reloadUIWithDic:(NSDictionary *)dic
{
    _beizhuTitleLabel.text = [NSString stringWithFormat:@"备注:%@",[Config isBlankString:[NSString stringWithFormat:@"%@",dic[@"postscript"]]] ? @"" : [NSString stringWithFormat:@"%@",dic[@"postscript"]]];
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
